projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a720a63
)
snapshot: Don't create clip nodes with 0 width or height
author
Timm Bäder
<mail@baedert.org>
Thu, 28 Dec 2017 09:52:57 +0000
(10:52 +0100)
committer
Timm Bäder
<mail@baedert.org>
Thu, 28 Dec 2017 15:48:35 +0000
(16:48 +0100)
gtk/gtksnapshot.c
patch
|
blob
|
history
diff --git
a/gtk/gtksnapshot.c
b/gtk/gtksnapshot.c
index e16e0d3fd79868e7d942263c3bee82b9e76f8996..45bb205c0c022caf4dde893b3c2cc8aefffa53db 100644
(file)
--- a/
gtk/gtksnapshot.c
+++ b/
gtk/gtksnapshot.c
@@
-589,6
+589,10
@@
gtk_snapshot_collect_clip (GtkSnapshot *snapshot,
if (graphene_rect_contains_rect (&state->data.clip.bounds, &node->bounds))
return node;
+ if (state->data.clip.bounds.size.width == 0 ||
+ state->data.clip.bounds.size.height == 0)
+ return NULL;
+
clip_node = gsk_clip_node_new (node, &state->data.clip.bounds);
if (name)
gsk_render_node_set_name (clip_node, name);